#ifndef __USART_H__
#define __USART_H__

#include "vbb_Queue.h"
#include "vbb_Utils.h"

typedef struct
{
    VBB_DAT_Queue rBuffer;
    VBB_Pin pin_rx;
    VBB_Pin pin_tx;
    USART_TypeDef * USARTx;        
} VBB_USART;

void vbb_USART_Init(VBB_USART * Usart, USART_TypeDef * USARTx, unsigned int BaudRate, unsigned int PriorityRate, char * Buffer, unsigned int BufferSize);
void vbb_USART_WriteByte(VBB_USART * Usart, char Byte);
void vbb_USART_Print(VBB_USART * Usart, const char * Text);
void vbb_USART_ClearBuffer(VBB_USART * Usart);

#endif
